import traceback

from fastapi import APIRouter, Depends

from app.api.response import Response, response_docs
from app.business.milvus_content import (
    MilvusContentDetailBiz,
)
from app.api.status import Status
from app.initializer import g
from app.middleware.auth import JWTUser, get_current_user

milvus_content_router = APIRouter()


# @milvus_content_router.get(
#     path="/milvus_content/{milvus_content_id}",
#     summary="milvus_contentDetail",
#     responses=response_docs(
#         model=MilvusContentDetailBiz,
#     ),
# )
# async def detail(
#         milvus_content_id: str,
#         current_user: JWTUser = Depends(get_current_user),
# ):
#     try:
#         milvus_content_biz = MilvusContentDetailBiz(id=milvus_content_id)
#         data = await milvus_content_biz.detail()
#         if not data:
#             return Response.failure(msg="未匹配到记录", status=Status.RECORD_NOT_EXIST_ERROR)
#     except Exception as e:
#         g.logger.error(traceback.format_exc())
#         return Response.failure(msg="milvus_contentDetail失败", error=e)
#     return Response.success(data=data)
